package com.yuncheng.spcyApi.service.impl;

import com.yuncheng.common.base.service.impl.BaseServiceImpl;
import com.yuncheng.spcyApi.entity.SysConfig;
import com.yuncheng.spcyApi.mapper.YcSysConfigMapper;
import com.yuncheng.spcyApi.service.ISysConfigService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class YcSysConfigServiceImpl extends BaseServiceImpl<YcSysConfigMapper, SysConfig> implements ISysConfigService {

    @Resource
    private YcSysConfigMapper ycSysConfigMapper;

    @Override
    public String getSysConfigByCode(String code) {
        /*String msg = null;

        List<SysConfig> config = list(new LambdaQueryWrapper<SysConfig>()
                .eq(SysConfig::getConfigCode, code));

        if (CollectionUtils.isNotEmpty(config)){
            msg = Optional.ofNullable(config.get(0).getConfigValue()).orElseGet(()->"");
        }*/

        return ycSysConfigMapper.querySysConfigByCode(code);
    }
}
